<!DOCTYPE html>
<!--解决idea thymeleaf 表达式模板报红波浪线-->
<!--suppress ALL -->
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>BOOK LIST</title>
    <!-- Bootstrap、layui CSS 文件 -->
    <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet" type="text/css"/>
    <link th:href="@{/layui/css/layui.css}" rel="stylesheet" type="text/css"/>

    <link th:href="@{/css/book_list.css}" rel="stylesheet" type="text/css"/>
</head>
<body>
<div class="main">
    <form class="form-inline" method="get" th:action="@{/book/search}">
        来源
        <select class="form-control" id="source" name="sourceKey">
            <option value="biquge" th:selected="${sourceKey} == 'biquge'">笔趣阁</option>
            <option value="zongheng" th:selected="${sourceKey} == 'zongheng'">纵横网</option>
            <option value="qidian" th:selected="${sourceKey} == 'qidian'">起点网</option>
        </select>
        <input type="text" id="bookName" name="bookName" class="form-control" placeholder="请输入..."
               th:value="${keyWord}"/>
        <button class="btn btn-info" type="submit">搜索</button>
    </form>
    <br/>
    <div id="books"></div>
    <div id="page"></div>
</div>
</body>
<script th:src="@{/js/jquery.min.js}"></script>
<script th:src="@{/layui/layui.js}"></script>
<script th:inline="javascript">
    //项目路径
    var ctx = [[${#request.getContextPath()}]];
    var books = [[${books}]];//取出后台数据
</script>
<script th:src="@{/js/book_list.js}"></script>
</html>